a = eval(input())
b = str(bin(a))
s = 0
for i in b:
	if ord(i) == ord('1'):
		s += 1
print (s)